home *** CD-ROM | disk | FTP | other *** search
/ Language/OS - Multiplatform Resource Library / LANGUAGE OS.iso / et / et3_0-a1.lha / et3 / src / UNIX / dynlink.h < prev    next >
C/C++ Source or Header  |  1992-04-27  |  3KB  |  63 lines

  1. #ifdef __GNUG__
  2. //pragma once
  3. #pragma interface
  4. #endif
  5. /* Error codes */
  6.  
  7. #define DLD_ENOFILE     1           /* cannot open file */
  8. #define DLD_EBADMAGIC   2           /* bad magic number */
  9. #define DLD_EBADHEADER  3           /* failure reading header */
  10. #define DLD_ENOTEXT     4           /* premature eof in text section */
  11. #define DLD_ENOSYMBOLS  5           /* premature end of file in symbols */
  12. #define DLD_ENOSTRINGS  6           /* bad string table */
  13. #define DLD_ENOTXTRELOC 7           /* premature eof in text relocation */
  14. #define DLD_ENODATA     8           /* premature eof in data section */
  15. #define DLD_ENODATRELOC 9           /* premature eof in data relocation */
  16. #define DLD_EMULTDEFS   10          /* multiple definitions of symbol */
  17. #define DLD_EBADLIBRARY 11          /* malformed library archive */
  18. #define DLD_EBADCOMMON  12          /* common block not supported */
  19. #define DLD_EBADOBJECT  13          /* malformed input file (not rel or
  20.                        archive) */
  21. #define DLD_EBADRELOC   14          /* bad relocation info */
  22. #define DLD_ENOMEMORY   15          /* virtual memory exhausted */
  23. #define DLD_EUNDEFSYM   16          /* undefined symbol */
  24.  
  25. extern int dld_errno;               /* error code returned by dld */
  26. extern int dld_undefined_sym_count; /* # of undefined global symbols */
  27.  
  28. extern int dld_init ();             /* initialize the dld routines */
  29. extern int dld_link ();             /* dynamically link and load an object
  30.                        file */
  31. extern unsigned long
  32. dld_get_symbol ();                  /* return the address of the named
  33.                        identifier  */
  34. extern unsigned long
  35. dld_get_func ();                    /* return the address of the named
  36.                        function */
  37. extern unsigned long
  38. dld_get_bare_symbol ();             /* same as dld_get_symbol except that
  39.                        no underscore (_) is prepended.  Use
  40.                        to locate symbols defined by
  41.                        assembly routines. */
  42. extern int dld_unlink_by_file ();   /* unlink a file */
  43. extern int dld_unlink_by_symbol (); /* unlink the module that define the
  44.                        given symbol */
  45.  
  46. extern char **
  47. dld_list_undefined_sym ();          /* return an array of undefined symbols */
  48.  
  49.  
  50. extern int
  51. dld_create_reference ();            /* explicitly create a reference to the
  52.                        given symbol. */
  53.  
  54. extern int dld_define_sym ();       /* explicitly define the value for the
  55.                        given symbol. */
  56.  
  57. extern void
  58. dld_remove_defined_symbol ();       /* remove a explicitly defined symbol */
  59.  
  60. extern void dld_perror ();          /* print error messages. */
  61. extern void dld_gc();               /* garbage collector */
  62.  
  63.